<template>
  <div class="row justify-content-center">
    <div class="col-8">
      <div v-if="cityList">
        <h2 class="jh-entity-heading" data-cy="cityListDetailsHeading"><span>CityList</span> {{ cityList.id }}</h2>
        <dl class="row jh-entity-details">
          <dt>
            <span>Location Id</span>
          </dt>
          <dd>
            <span>{{ cityList.locationId }}</span>
          </dd>
          <dt>
            <span>Location Name</span>
          </dt>
          <dd>
            <span>{{ cityList.locationName }}</span>
          </dd>
          <dt>
            <span>Country Name</span>
          </dt>
          <dd>
            <span>{{ cityList.countryName }}</span>
          </dd>
          <dt>
            <span>Adm 1 Name</span>
          </dt>
          <dd>
            <span>{{ cityList.adm1Name }}</span>
          </dd>
          <dt>
            <span>Adm 2 Name</span>
          </dt>
          <dd>
            <span>{{ cityList.adm2Name }}</span>
          </dd>
          <dt>
            <span>Latitude</span>
          </dt>
          <dd>
            <span>{{ cityList.latitude }}</span>
          </dd>
          <dt>
            <span>Longitude</span>
          </dt>
          <dd>
            <span>{{ cityList.longitude }}</span>
          </dd>
        </dl>
        <button type="submit" v-on:click.prevent="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
          <font-awesome-icon icon="arrow-left"></font-awesome-icon>&nbsp;<span> Back</span>
        </button>
        <router-link v-if="cityList.id" :to="{ name: 'CityListEdit', params: { cityListId: cityList.id } }" custom v-slot="{ navigate }">
          <button @click="navigate" class="btn btn-primary">
            <font-awesome-icon icon="pencil-alt"></font-awesome-icon>&nbsp;<span> Edit</span>
          </button>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script lang="ts" src="./city-list-details.component.ts"></script>
